#ifndef OBJETO_H
#define OBJETO_H

#include <vector>

#include "CArea.h"
#include "CAnimation.h"
#include "CCamera.h"
#include "CFPS.h"
#include "CSurface.h"

//=============================================================================
class CObjeto  {
    protected:
		CAnimation      Anim_Control;
		SDL_Surface*    Surf_Objeto[4];

	public:
		float	X;
		float	Y;

		int		Width;
		int		Height;

		//bool	Dead;
		int		Flags;

	protected:
		int		Col_X;
		int		Col_Y;
		int		Col_Width;
		int		Col_Height;
		int     MaxFrames;

	public:
		Bomba();

		virtual ~Bomba();

	public:
		virtual bool OnLoad(char* File, int Width, int Height, int MaxFrames);

		virtual void OnLoop();

		virtual void OnRender(SDL_Surface* Surf_Display);

		virtual void OnCleanup();

		virtual void OnAnimate();

		virtual bool OnCollision(CEntity* Entity);

	public:
		bool    Collides(int oX, int oY, int oW, int oH);

	protected:
		bool 	PosValid(int NewX, int NewY);

		bool 	PosValidTile(CTile* Tile);

		bool 	PosValidEntity(CEntity* Entity, int NewX, int NewY);
};


//=============================================================================

#endif


